package cn.com.greatwall.kafka.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.com.greatwall.common.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author herw
 * @Time 2021-01-21 11:00:50
 * @Version 1.0
 * @Description: TODO(用一句话描述该文件做什么)
 */
@Entity
@Getter
@Setter
@Table(name = "mq_topic")
public class Topic extends BaseEntity implements Serializable {
    @Id
    @Column(name = "topic_id")
    @ApiModelProperty(value = "ID", hidden = true)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
//    @ApiModelProperty(value = "集群别名")
//    private String clusterId;
    @ManyToOne
    @JoinColumn(name = "cluster_id")
    @ApiModelProperty(value = "集群别名")
    private Cluster cluster;

    @ApiModelProperty(value = "主题名称")
    private String name;
    
    @ApiModelProperty(value = "partition")
    @Column(name = "`partition`")
    private Integer partition;

    @ApiModelProperty(value = "`replication`")
    @Column(name = "`replication`")
    private Short replication;
    
    @ApiModelProperty(value = "ttl")
    private Long ttl;
    
    @ApiModelProperty(value = "配置")
    private String config;
    
    @ApiModelProperty(value = "fileSize")
    private Long fileSize;
    
    @ApiModelProperty(value = "备注")
    private String comments;
}
